<template>
  <div>
    <!-- 营销洞察 -->
    <el-tabs type="card" v-model="activeName" @tab-click="handleClick">
      <el-tab-pane name="1" label="商机信息">
        <businessOpportunityInformation></businessOpportunityInformation>
      </el-tab-pane>
      <el-tab-pane name="2" label="同行业客户分析">
        <customerAnalysis></customerAnalysis>
      </el-tab-pane>
    </el-tabs>
  </div>
</template>

<script setup name="marketingInsight">
import { nextTick, reactive, ref, toRefs } from "vue"
import businessOpportunityInformation from "./components/businessOpportunityInformation.vue"
import customerAnalysis from "./components/customerAnalysis.vue"

  const list_0 = ref([])
  const loading = ref(false)
  const total = ref(0)
  const activeName = ref('1')
  const queryRef = ref(null)
  const branchOptions = ref([
    { label: '全部', value: '' },
  ])

  const data = reactive({
    queryParams: {
      section: '',
      branchId: '',
      affiliation: [],
      pageNum: 1,
      pageSize: 10,
    },
  })

  const { queryParams } = toRefs(data)
  const handleClick = (tab) => {
    getList()
  }
  const getList = () => {
    loading.value = true
    setTimeout(() => {
      list_0.value = [
        {
          boNo: '202401010001',
          name: '中国建筑工程有限公司团险',
          estimatedPremium: '8,000',
          estimatedAllPremium: '10,000',
          targetPremium: '7,000',
          estimatedQuotation: '2024-06-06',
          businessChannel: '经纪',
          bidPremium: '8,000',
          status: '潜在商机',
          policyPremium: '8,100',
        },
        {
          boNo: '202401010002',
          name: '中国建筑工程有限公司团险',
          estimatedPremium: '10,000',
          estimatedAllPremium: '10,000',
          targetPremium: '9,000',
          estimatedQuotation: '2024-06-06',
          businessChannel: '直接',
          bidPremium: '9,000',
          status: '立项审批',
          policyPremium: '9,100',
        },
        {
          boNo: '202401010003',
          name: '中国建筑工程有限公司团险',
          estimatedPremium: '5,000',
          estimatedAllPremium: '6,000',
          targetPremium: '5,000',
          estimatedQuotation: '2024-06-06',
          businessChannel: '代理',
          bidPremium: '6,000',
          status: '商机跟进',
          policyPremium: '6,100',
        },
      ]
      total.value = list_0.value.length
      loading.value = false
    }, 500);
  }
  const handle = (val) => {

  }
  const exportList = () => {
    
  }
  getList()
</script>
<style lang="scss" scoped>
</style>
